dict1 ={'name':'张三','age':18,'sex':'男'}
#遍历字典的key
# for a in dict1.keys():
#     print(a)
#
for a in dict1:  #默认遍历key值
    print(a)


#遍历字典的value
for a in dict1.values():
    print(a)


#遍历字典的键值对
for a in dict1.items():
    print(a)